package model

import "time"

type Like struct {
	LikeID     int64     `json:"likeId" gorm:"column:like_id;primary_key;auto_increment" binding:"-"`
	VideoID    int64     `json:"videoId" gorm:"column:video_id;not null" binding:"-"`
	UserID     int64     `json:"userId" gorm:"column:user_id;not null" binding:"-"`
	CreateDate time.Time `json:"createDate" gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;autoCreateTime"`
}

func (Like) TableName() string {
	return "like"
}

type LikeAction struct {
	VideoID    int64 `json:"videoId" form:"videoId"`
	ActionType int64 `json:"actionType" form:"actionType"` // 1点赞 2取消点赞
}

type LikeMessage struct {
	VideoID    int64 `json:"videoId" form:"videoId"`
	UserID     int64 `json:"userId"`
	ActionType int64 `json:"actionType" form:"actionType"` // 1点赞 2取消点赞
}
